package com.ruoyi.project.wx.api;


import com.github.pagehelper.PageInfo;
import com.ruoyi.common.utils.bootdo.R;
import com.ruoyi.project.wx.service.GoodsNineService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

/**
 * Created by HP on 2019/7/1.
 */
@Controller
@RequestMapping("/api/goodsNine")
public class ApiGoodsNineController {

    @Autowired
    private GoodsNineService goodsNineService;

    /*
    * 查询9.9专区商品列表
    * */
    @ResponseBody
    @RequestMapping("/getNineGoodsList")
    public R getNineGoodsList(@RequestBody Map<String,Object> paramMap) {
        try{
            PageInfo<Map<String,Object>> list = goodsNineService.getNineGoodsList(paramMap);
            return R.ok().put("data", list);
        } catch (Exception e) {
            e.printStackTrace();
            return R.error("查询失败");
        }
    }



}
